﻿<%@ page language="java" pageEncoding="UTF-8"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>湖北省地质灾害应急调查工作平台</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Language" content="zh-CN" />
		<script src="lib/jquery-1.7.1.min.js" type="text/javascript"></script>
		
		<script type="text/javascript">
			//按钮的事件
			function loginFunc(){
				var username = $("#userNameInput").val();
				var password = $("#passWordInput").val();
				var url = "userLogin.shtml";
				var obj = {username:username,password:password};
				$.post(url,obj,loginCallback);
			};
			
			//登录的回调
			function loginCallback(res){
				if(res=="true"){
					window.location = "index.jsp";
				}else{
					alert("用户名或密码错误!");
				}
			}
			
			function resetFunc(){
				$("#userNameInput").val("");
				$("#passWordInput").val("");
			}
		</script>
	</head>
	<body style="padding:1px;margin:0px;font-family: 微软雅黑">
		<div id="loginPageDiv" style="width:797px;height:482px;background-color:#70B7E4;text-align: center;">
			<img src="image/login/bg.png" />
			<table style="margin-left:480px;margin-top:-285px;">
				<tr>
					<td>用户名：</td><td><input id="userNameInput" type="text" value="admin"/></td>
				</tr>
				<tr>
					<td>密&nbsp;&nbsp;码：</td><td><input id="passWordInput" type="password" value="admin"/></td>
				</tr>
				<tr>
					<td></td><td><img onclick="loginFunc()" id="loginButton" style="margin-right:10px;cursor: pointer;" src="image/login/enter.png" alt="登录"/>
					<img onclick="resetFunc()" id="resetButton" style="cursor:pointer;" src="image/login/reset.png" alt="重置"/></td>
				</tr>
			</table>			
		</div>
	</body>
</html>
